package com.yangyu.mapper;

import com.yangyu.message.user.RegisterVo;
import com.yangyu.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper {

    int addUser(@Param("user") RegisterVo user);

    int deleteUser(@Param("id") long id);

    int editUser(@Param("user") User user);

    User getUserById(@Param("id") long id);

    String getUserNameById(@Param("id") long id);

    List<User> getUsers(@Param("user") User user);

    List<User> checkUserName(@Param("userName") String userName);

    List<User> checkEmail(@Param("email") String email);

    User getPwdByEmail(@Param("email") String email);
}
